import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '验收标题',
    align: "center", resizable: true,
    dataIndex: 'title'
  },
  {
    title: '项目',
    align: "center", resizable: true,
    dataIndex: 'projectId_dictText'
  },
  {
    title: '子项目',
    align: "center", resizable: true,
    dataIndex: 'subProjectId_dictText'
  },
  {
    title: '验收状态',
    align: "center", resizable: true,
    dataIndex: 'acceptanceStatus_dictText'
  },
  {
    title: '验收时间',
    align: "center", resizable: true,
    dataIndex: 'acceptanceTime',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '提交人员',
    align: "center", resizable: true,
    dataIndex: 'acceptancePerson_dictText'
  },

  {
    title: '审核人',
    align: "center", resizable: true,
    dataIndex: 'reviewerUserId_dictText'
  },

];

// 高级查询数据
export const superQuerySchema = {
  acceptanceStatus: {title: '验收状态',order: 0,view: 'list', type: 'string',dictCode: 'acceptance_status',},
  acceptanceTime: {title: '验收时间',order: 1,view: 'date', type: 'string',},
  title: {title: '验收标题',order: 2,view: 'text', type: 'string',},
  fileRecordId: {title: '附件',order: 3,view: 'file', type: 'string',},
  projectId: {title: '项目',order: 4,view: 'list', type: 'string',dictTable: "c_project_application", dictCode: 'id', dictText: 'project_name',},
  subProjectId: {title: '子项目',order: 5,view: 'list', type: 'string',dictTable: "c_sub_project", dictCode: 'id', dictText: 'sub_project_name',},
  acceptancePerson: {title: '提交人员',order: 6,view: 'list', type: 'string',dictTable: "sys_user", dictCode: 'id', dictText: 'username',},
  remark: {title: '提交备注',order: 7,view: 'textarea', type: 'string',},
  reviewerUserId: {title: '审核人',order: 8,view: 'list', type: 'string',dictTable: "sys_user", dictCode: 'id', dictText: 'username',},
  reviewTime: {title: '审核时间',order: 9,view: 'datetime', type: 'string',},
  reviewDescription: {title: '审核描述',order: 10,view: 'textarea', type: 'string',},
  log: {title: '过程日志',order: 11,view: 'textarea', type: 'string',},
};
